import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        int n = s.length;
        // 计算要添加几个小数点
        int cnt = n % 3 == 0 ? n / 3 - 1 : n / 3;
        StringBuilder sb = new StringBuilder();
        // 记录下标
        int i = n - 1;
        while (cnt-- > 0) {
            int j = i - 2;
            for (; i >= j; i--) {
                sb.append(s[i]);
            }
            sb.append(",");
        }
        for (; i >= 0; i--) {
            sb.append(s[i]);
        }
        sb.reverse();
        String ans = sb.toString();
        for (int j = 0; j < ans.length(); j++) {
            System.out.print(ans.charAt(j));
        }
    }
}
